#pragma once

#include <map>
#include <string>
#include <list>

#ifdef LIBSQLITE4CONFIG_EXPORT
#define LIBSQLITE4CONFIGAPI __declspec(dllexport)
#else
#define LIBSQLITE4CONFIGAPI __declspec(dllexport)
#endif


namespace LIBSQLITE4CONFIGSPEACE {

#define PRINTLOG	1

	class LIBSQLITE4CONFIGAPI SQLite4Config {
	public:
		static SQLite4Config* GetConfig(std::string configname, bool liteconfig = true);

		virtual long Insert(std::string key, std::string value, bool unique = false, std::string item = "0") = 0;
		virtual long update(std::string key, std::string value, std::string item = "0") = 0;
		virtual std::string Find(std::string key, std::string item = "0") = 0;//case sensitive
		virtual int Remove(std::string key, std::string item = "0") = 0;
	};
	class LIBSQLITE4CONFIGAPI SQLite4MiniDB {
	public:
		static SQLite4MiniDB* GetMiniDB(std::string dbname, std::list<std::string> columns);

		virtual long Insert(std::list<std::string> columns, std::list<std::string> values, bool unique = false) = 0;//unique arguments not used for now
		virtual long Update(std::list<std::string> columns, std::list<std::string> values, std::string conditions) = 0;
		virtual long Find(std::list<std::string> columns, std::map<std::string, std::list<std::string>>& values, std::string conditions) = 0;//case sensitive
		virtual int Remove(std::string conditions) = 0;
	};
}